/* Copyright(C): Leaf Johnson 2009,2010

    This file is part of leaf-lib.

    leaf-lib is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    leaf-lib is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with leaf-lib.  If not, see <http://www.gnu.org/licenses/>.


 * 
 * 
 */


#ifndef WALKSPEED_H_INCLUDED
#define WALKSPEED_H_INCLUDED
#include <devices_ext/promotion.h>
inline void walkInit(PromPort pl, PromPort pr, PromId leftId, PromId rightId);
#define walk_init walkInit
inline SpeedPair getCurSpeed(void);
#define get_cur_speed getCurSpeed;
inline void      setCurSpeed(const SpeedPair *p);
#define set_cur_speed setCurSpeed
inline void      setLeftSpeed(speed_t speed);
#define set_left_speed setLeftSpeed
inline void      setRightSpeed(speed_t speed);
#define set_right_speed setRightSpeed
inline void      setSameSpeed(speed_t speed);
#define set_same_speed setSameSpeed
inline void      setRightRev( Bool rev );
#define set_right_rev setRightRev
inline void      setLefttRev( Bool rev );
#define set_left_recv setLeftRev

inline void      moveLeft(dist_t dist);
#define move_left moveLeft
inline void      moveRight(dist_t dist);
#define move_right moveRight
inline void      moveSame(dist_t dist);
#define move_same moveSame
inline void      holdPosition(void);
#define hold_position holdPosition
inline Promotion* getPromLeft(void);
#define get_prom_left getPromLeft
inline Promotion* getPromRight(void);
#define get_prom_right getPromRight

#ifdef COMP_SPEED_H
#define speedl(s) setLeftSpeed(s)
#define speedr(s) setRightSpeed(s)
#define speed(s)  setSameSpeed(s)
#define movel(dist) moveLeft(dist)
#define mover(dist) moveRight(dist)
#define move(dist)  moveSame(dist)
#endif
#endif  /* WALKSPEED_H_INCLUDED */
